import type { RouteRecordRaw } from 'vue-router';

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/layout/DefaultLayout.vue'),
    redirect: '/dashboard',
    children: [
      {
        // 数据看板
        path: '/dashboard',
        name: 'Dashboard',
        component: () => import('@/pages/DashBoard/index.vue'),
      },
      {
        // 充电站监控
        path: '/chargingstation/monitor',
        name: 'Monitor',
        component: () => import('@/pages/ChargingStation/Monitor/index.vue'),
      },
      {
        // 营收统计
        path: '/chargingstation/revenue',
        name: 'Revenue',
        component: () => import('@/pages/ChargingStation/Revenue/index.vue'),
      },
      {
        // 充电桩管理
        path: '/chargingstation/fault',
        name: 'Fault',
        component: () => import('@/pages/ChargingStation/Fault/index.vue'),
      },
      {
        // 电子地图
        path: '/map',
        name: 'Map',
        component: () => import('@/pages/Map/index.vue'),
      },
      {
        // 订单管理
        path: '/operations/orders',
        name: 'Orders',
        component: () => import('@/pages/Operations/Orders/index.vue'),
      },
      {
        // 订单详情
        path: '/operations/detail',
        name: 'Detail',
        component: () => import('@/pages/Operations/Detail/index.vue'),
      },
      {
        // 计费管理
        path: '/operations/total',
        name: 'Total',
        component: () => import('@/pages/Operations/Total/index.vue'),
      },
      {
        // 报警管理
        path: '/alarm',
        name: 'Alarm',
        component: () => import('@/pages/Alarm/index.vue'),
      },
      {
        // 会员卡管理
        path: '/equipment',
        name: 'Equipment',
        component: () => import('@/pages/Equipment/index.vue'),
      },
      {
        // 招商管理
        path: '/document',
        name: 'Document',
        component: () => import('@/pages/Document/index.vue'),
      },
      {
        // 系统设置
        path: '/system',
        name: 'System',
        component: () => import('@/pages/System/index.vue'),
      },
      {
        // 个人中心
        path: '/personal',
        name: 'Personal',
        component: () => import('@/pages/Personal/index.vue'),
      },
    ],
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/pages/Login/index.vue'),
  },
  {
    path: '/:pathMatch(.*)*',
    name: 'NotFound',
    component: () => import('@/pages/NotFound/index.vue'),
  },
];

export default routes;
